Base class for all materials in the component. More...
Public Member Functions | |
| Material (MATERIAL_TYPE type) noexcept | |
| virtual | ~Material () |
| nkMemory::StringView | getName () const |
| nkGraphics::Shader * | getShader () const |
| MATERIAL_TYPE | getType () const |
| void | setName (nkMemory::StringView value) |
| virtual bool | load ()=0 |
| virtual void | unload ()=0 |
| virtual void | exportClassToTree (nkExport::Node *rootNode) override |
| virtual void | importClassFromTree (nkExport::Node *rootNode) override |
Public Member Functions inherited from nkExport::Exportable | |
| Exportable () noexcept | |
| virtual | ~Exportable () |
Base class for all materials in the component.
This class offers basic information and the general interface to access them. Materials are designed to be inter-operable with the nkGraphics::Entity class. As such, the shader created by a material is usable directly on an entity.
|
noexcept |
Constructor.
| type | The material type, usually given by the underlying implementation. |
|
virtual |
Destructor.
| nkMemory::StringView nkAstraeus::Material::getName | ( | ) | const |
| nkGraphics::Shader* nkAstraeus::Material::getShader | ( | ) | const |
| MATERIAL_TYPE nkAstraeus::Material::getType | ( | ) | const |
| void nkAstraeus::Material::setName | ( | nkMemory::StringView | value | ) |
Sets the name of the material.
| value | The name to set. |
|
pure virtual |
Loads the material and make it ready for rendering.
Implemented in nkAstraeus::PbsMaterial.
|
pure virtual |
Unloads the material and its internal memory. After that, the material is unusable for rendering.
Implemented in nkAstraeus::PbsMaterial.
|
overridevirtual |
Exports an item into a tree describing its structure and its data.
| rootNode | The node into which the object has to write its related information. |
Implements nkExport::Exportable.
Reimplemented in nkAstraeus::PbsMaterial.
|
overridevirtual |
Imports information from a tree which is supposed to describe its structure and data.
| rootNode | The root node of the tree holding the information. |
Implements nkExport::Exportable.
Reimplemented in nkAstraeus::PbsMaterial.